package cn.crm.controller;

import cn.crm.pojo.SysUser;
import cn.crm.service.SysUserService;
import cn.crm.utils.Result;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/SysUser")
public class SysUserController {
    @Autowired
    private SysUserService sysUserService;

    @PostMapping("/Login")
    public Result login(@RequestBody SysUser sysUser){
        System.out.println(sysUser);
        return sysUserService.login(sysUser);
    }
    @PostMapping("/Page")
    public Page getPage(@RequestBody Page page){
        return sysUserService.getSysUserPageJoinSysRole(page);
    }
}
